<template>
    <SelectActEquip v-if="selectEquipVisible" @confirm="selectConfirm" @cancel="selectEquipVisible = false"></SelectActEquip>
    <div class="e-form" v-else>
        <div class="tabs" v-if="Object.keys(formData).length != 0">
             <el-tabs tab-position="left" v-model="tabsName" @tab-click="onChangeTab">
                 <!-- 基本信息 -->
                <el-tab-pane label="基本信息" name="baseInfo" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="结算明细" name="planDetail" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="保证金" name="bond" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="附件信息" name="attach" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="审核历史" name="auditHistory" :disabled="clickTabFlag"></el-tab-pane>
                <div>
                    <div id="baseInfoCon">
                        <div class="tabs-title" id="baseInfo">基本信息</div>
                        <div style="width: 100%" class="form">
                            <el-form ref="form" :model="formData.transportContractSettle" label-width="200px">
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="结算编号：">
                                            <span>{{ formData.transportContractSettle.billNo }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="结算日期：">
                                            <el-date-picker
                                                v-model="formData.transportContractSettle.billDate"
                                                type="date"
                                                placeholder="选择日期"
                                                value-format="yyyy-MM-dd"
                                                format="yyyy 年 MM 月 dd 日"
                                                :clearable="false"
                                            >
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="合同编号：">
                                            <el-input v-model="formData.transportContractSettle.contractNo"  readonly>
                                                <i slot="suffix" class="el-input__icon el-icon-document-copy" ></i>
                                            </el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="结算单位：">
                                            <span>{{ formData.transportContractSettle.settleOrgName }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                    <el-form-item label="税率%：">
                                            <span>{{ formData.transportContractSettle.taxRate }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="税额（元）：">
                                            <el-input v-model="formData.transportContractSettle.taxAmount">
                                            </el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="发票编号：">
                                            <el-input v-model="formData.transportContractSettle.invoice"  readonly>
                                                <i slot="suffix" class="el-input__icon el-icon-document-copy" ></i>
                                            </el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="机构：">
                                            <span>{{ formData.transportContractSettle.orgName }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="不含税金额（元）：">
                                            <span>{{ formData.transportContractSettle.amountExcludingTax }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="税价合计（元）：">
                                            <span>{{ formData.transportContractSettle.totalTaxPrice }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="累计结算金额：">
                                            <span>{{ formData.transportContractSettle.cumulativeSettleAmount }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="终期结算：">
                                            <el-checkbox v-model="formData.transportContractSettle.finalSettlement"></el-checkbox>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="冲预付款：">
                                            <el-checkbox v-model="formData.transportContractSettle.rushAdvanceCharge"></el-checkbox>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <!-- 勾选冲预付款后填写 -->
                                        <el-form-item label="冲预付款金额（元）：">
                                            <el-input v-model="formData.transportContractSettle.rushAdvanceChargePrice">
                                            </el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                <el-col :span="12">
                                        <el-form-item label="币种：">
                                            <el-select
                                                v-model="formData.transportContractSettle.currencyId"
                                                placeholder="请选择"
                                            >
                                                <el-option
                                                    v-for="(
                                                        item, index
                                                    ) in currencyForm"
                                                    :key="index"
                                                    :label="item"
                                                    :value="item"
                                                >
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12" >
                                        <el-form-item label="传输财务共享：">
                                            <span>{{ share.find(x=>x.value === formData.transportContractSettle.share).label}}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item label="本位币：">
                                            <span>{{ formData.transportContractSettle.baseCurName }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item label="本位币汇率：">
                                            <span>{{ formData.transportContractSettle.baseCurRate }}</span>
                                            &emsp;
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="24">
                                        <el-form-item  label="备注信息：">
                                            <el-input type="textarea" v-model="formData.transportContractSettle.remarks" placeholder="请输入内容"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>
                        </div>
                    </div>

                    <div id="planDetailCon">
                        <div class="tabs-title" id="planDetail">结算明细</div>
                        <div class="e-table">
                            <div class="top">
                                <div class="left">
                                    <el-button size="mini" class="btn-blue" @click="addPlan">新增</el-button>
                                    <el-button size="mini"  @click="deletePlanList">删除</el-button>
                                </div>
                            </div>
                            <el-table
                                ref="planTable"
                                :data="formData.transportContractSettleDtlList"
                                border
                                style="width: 100%"
                                @cell-mouse-enter="cellMouseEnter"
                                @cell-mouse-leave="cellMouseLeave"
                                :cell-class-name="cellClsNm"
                                @selection-change="planTableSelect"
                            >
                                <el-table-column type="selection" width="55" align="center">
                                </el-table-column>
                                <el-table-column
                                    prop="detailedName"
                                    label="名称"
                                    min-width="200"
                                    align="center"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="unit"
                                    label="计量单位"
                                    width="200"
                                    align="center"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="departurePlace"
                                    label="出发地"
                                    width="200"
                                    align="center"
                                >
                                </el-table-column>
                                 <el-table-column
                                    prop="destination"
                                    label="目的地"
                                    width="200"
                                    align="center"
                                >
                                </el-table-column>
                                 <el-table-column
                                    prop="amount"
                                    label="数量"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.amount">
                                        </el-input>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="price"
                                    label="单价（元）"
                                    width="200"
                                    align="center"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="sum"
                                    label="金额（元）"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.sum">
                                        </el-input>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                    </div>

                    <div id="bondCon">
                        <div class="tabs-title" id="bond">暂扣保证金</div>
                        <div class="e-table">
                            <div class="top">
                                <div class="left">
                                    <el-button size="mini" class="btn-blue" @click="addPlan">新增</el-button>
                                    <el-button size="mini"  @click="deletePlanList">删除</el-button>
                                </div>
                            </div>
                            <el-table
                                ref="planTable"
                                :data="formData.facilityBondList"
                                border
                                style="width: 100%"
                                @cell-mouse-enter="cellMouseEnter"
                                @cell-mouse-leave="cellMouseLeave"
                                :cell-class-name="cellClsNm"
                                @selection-change="planTableSelect"
                            >
                                <el-table-column type="selection" width="55" align="center">
                                </el-table-column>
                                <el-table-column
                                    prop="withholdBondName"
                                    label="名称"
                                    min-width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.withholdBondName"  readonly>
                                            <i slot="suffix" class="el-input__icon el-icon-document-copy" ></i>
                                        </el-input>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="withholdBond"
                                    label="暂扣保证金（元）"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.withholdBond" clearable></el-input>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="lastPeriodWithholdBond"
                                    label="截止上期末暂扣保证金（元）"
                                    width="300"
                                    align="center"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="specificationModel"
                                    label="说明"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.withholdExplain" clearable></el-input>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div class="tabs-title">返还保证金</div>
                         <div class="e-table">
                            <div class="top">
                                <div class="left">
                                    <el-button size="mini" class="btn-blue" @click="addPlan">新增</el-button>
                                    <el-button size="mini"  @click="deletePlanList">删除</el-button>
                                </div>
                            </div>
                            <el-table
                                ref="planTable"
                                :data="formData.facilityReturnBondList"
                                border
                                style="width: 100%"
                                @cell-mouse-enter="cellMouseEnter"
                                @cell-mouse-leave="cellMouseLeave"
                                :cell-class-name="cellClsNm"
                                @selection-change="planTableSelect"
                            >
                                <el-table-column type="selection" width="55" align="center">
                                </el-table-column>
                                <el-table-column
                                    prop="returnBondName"
                                    label="名称"
                                    min-width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.returnBondName"  readonly>
                                            <i slot="suffix" class="el-input__icon el-icon-document-copy" ></i>
                                        </el-input>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="returnBond"
                                    label="返还保证金（元）"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.returnBond" clearable></el-input>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    prop="endNotReturnBond"
                                    label="截止本期末未返还保证金（元）"
                                    width="300"
                                    align="center"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="returnExplain"
                                    label="说明"
                                    width="200"
                                    align="center"
                                >
                                    <template slot-scope="{ row }">
                                        <el-input v-model="row.returnExplain" clearable></el-input>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                    </div>

                    <div id="attachCon">
                        <div class="tabs-title" id="attach">附件信息</div>
                        <attach-comp :relationId="attachId" bucketName="testModule" />
                    </div>

                    <div id="auditHistoryCon" class="con">
                        <div class="tabs-title" id="auditHistory">审核历史</div>
                        <div class="e-table">
                            <el-table
                                :data="tableData"
                                border
                                style="width: 100%"
                                @cell-mouse-enter="cellMouseEnter"
                                @cell-mouse-leave="cellMouseLeave"
                                :cell-class-name="cellClsNm"
                            >
                                <el-table-column prop="a1" label="审核级次" width="200"> </el-table-column>
                                <el-table-column prop="a" label="审核人" width="200"> </el-table-column>
                                <el-table-column prop="b" label="审核人岗位" width="200"> </el-table-column>
                                <el-table-column prop="c" label="通知时间" width="200"> </el-table-column>
                                <el-table-column prop="c" label="审核时间" width="200"> </el-table-column>
                                <el-table-column prop="c" label="审核意见" width="200"> </el-table-column>
                            </el-table>
                        </div>
                        <ComPagination />
                    </div>
                </div>
            </el-tabs>
        </div>
         <div class="buttons">
                <el-button type="primary" size="small" class="btn-blue"
                    >打印</el-button
                >
                <el-button
                    type="primary"
                    size="small"
                    class="btn-delete"
                    @click="deletePop"
                    v-if="state === '0'"
                    >删除</el-button
                >
                <el-button
                    type="primary"
                    size="small"
                    class="btn-blue"
                    @click="nullifyeBIll"
                    v-if="state === '1'"
                    >作废</el-button
                >
                <el-button type="primary" size="small" class="btn-blue"
                    >审核</el-button
                >
                <el-button type="primary" size="small" class="btn-blue"
                    >撤回</el-button
                >
                <el-button
                    type="primary"
                    size="small"
                    class="btn-blue"
                    @click="submit"
                    v-if="state === '0'"
                    >保存并提交</el-button
                >
                <el-button
                    type="primary"
                    size="small"
                    class="btn-blue"
                    @click="preserve"
                     v-if="state === '0'"
                    >保存</el-button
                >
                <el-button size="small" @click="handleClose">取消</el-button>
            </div>
        <div id="seat" :style="{height: seatHeight + 'px'}"></div>
    </div>
</template>

<script>
import ComPagination from '@/components/pagination/pagination.vue'
import { mapState } from 'vuex'
import $ from 'jquery'
import request from '@/api/equip/equipSettle.js'
import '@/utils/jquery.scrollTo.min'
import {  showSuccessPop, showPromptPop } from '@/utils/common'
import SelectActEquip from '@/pages/equipment/equipPlan/majorPlan/majorPlanAddDialog/selectActEquip'
import AttachComp from '@/components/common/attachIndex'
export default {
    data () {
        return {
            // dialogVisible: false,
            // fullscreen: false,
            tabsName: 'baseInfo',
            screenWidth: 0,
            screenHeight: 0,
            lastConHeight: 0,
            clickTabFlag: false, // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            form: {
                name: '',
                region: '',
                date1: '',
                date2: '',
                delivery: false,
                type: [],
                resource: '',
                desc: ''
            },
            selectEquipVisible: false,
            tableData: [],
            planTableData: [{ 'd': 123, c: '' }],
            value: '',
            textarea: '',
            formData: {
                //基础信息
                'transportContractSettle': {
                    'amountExcludingTax': 0,
                    'baseCurId': '',
                    'baseCurName': '',
                    'baseCurRate': 0,
                    'baseCurTotalPrice': 0,
                    'billDate': '',
                    'billId': '',
                    'billNo': '',
                    'contractId': '',
                    'contractNo': '',
                    'cumulativeSettleAmount': 0,
                    'currency': '',
                    'currencyId': '',
                    'evaluateGrade': '',
                    'finalSettlement': 0,
                    'founderId': '',
                    'founderName': '',
                    'invoice': 0,
                    'isRed': true,
                    'nullifyCreated': '',
                    'nullifyCreator': '',
                    'nullifyCreatorId': '',
                    'nullifyDesciption': '',
                    'nullifyReason': '',
                    'orgId': '',
                    'orgName': '',
                    'redState': '',
                    'remarks': '',
                    'rmbId': '',
                    'rmbName': '',
                    'rmbRate': 0,
                    'rmbSumTotalPrice': 0,
                    'rushAdvanceCharge': 0,
                    'rushAdvanceChargePrice': 0,
                    'settleOrgId': '',
                    'settleOrgName': '',
                    'share': '0',
                    'sourceId': '',
                    'sourceNumber': '',
                    'state': '0',
                    'taxAmount': 0,
                    'taxRate': 0,
                    'totalTaxPrice': 0,
                    'workId': ''
                },
            },
            billid: '',
            share: [
                {
                    value: '0',
                    label: '未传'
                },
                {
                    value: '1',
                    label: '已传'
                }
            ], //财务共享状态
            oldState: [
                {
                    value: '0',
                    label: '合同'
                },
                {
                    value: '1',
                    label: '申请'
                }
            ], //源单类型
            planSelect: []//结算明细选择项
        }
    },
    computed: {
        ...mapState({
            userInfo: state => state.userInfo,
            currencyForm: state => state.contract.ctClassify.currencyForm, //币种
            unitMeasure: state => state.equip.equipData.unitMeasure//计量单位
        }),
        statusLable () {
            return param=> {
                const state =  this.$store.state.equip.equipData.state//传财务单据状态
                const obj = state.find(x=>x.value === param)
                return obj.label
            }
        },
        //当前单据状态
        state () {
            return this.formData.transportContractSettle.state
        },
        // 填补底部空白，以使高度够滚动
        seatHeight () {
            return this.screenHeight - 72 - this.lastConHeight
        },
        attachId () {
            return this.$route.query.billid
        },
        // 点击提示窗“确定”按钮后的回调
        localPopConfirm () {
            if (this.popConfirm) {
                switch (this.popStatus) {
                case 'prompt': // success 成功信息确定 error 错误信息确定
                    this.deleteBIll()
                }

                this.setPopConfirm(false)
            }
            return this.popConfirm
        }
    },
    components: {
        AttachComp,
        ComPagination,
        SelectActEquip
    },
    created () {
        this.billid = this.$route.query.billid
        console.log('billid', this.billid)
        this.userId = localStorage.getItem('userId')
        this.getDicValue()
        this.getInfo()
    },
    mounted () {
        // 获取最后一个内容区域的高度，计算底部空白
        this.getLastConHeight()

        // 保存所有tabName
        const arr = ['baseInfo', 'planDetail', 'bond', 'attach', 'auditHistory']
        let $idsTop = []
        window.addEventListener('scroll', () => {
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            if (this.clickTabFlag) {
                return
            }

            if (!$idsTop[$idsTop.length - 1]) {
                $idsTop = arr.map(item => {
                    console.log('item', item)
                    const itemTop = document.getElementById(item).offsetTop
                    return itemTop
                })
            }
            const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
            // 倒序查找
            let curLocal = 0
            for (let len = $idsTop.length, i = len - 1; i >= 0; i--) {
                let item = $idsTop[i]
                if ((scrollTop + 1) >= item) {
                    curLocal = i
                    break
                }
            }
            // 设置对应tabName
            this.tabsName = arr[curLocal]
        })

        this.screenWidth = document.documentElement.clientWidth
        this.screenHeight = document.documentElement.clientHeight
        window.addEventListener('resize', () => {
            this.screenWidth = document.documentElement.clientWidth
            this.screenHeight = document.documentElement.clientHeight
            $idsTop = arr.map(item => {
                const itemTop = document.getElementById(item).offsetTop
                return itemTop
            })
        })
    },
    methods: {
        //获取当前使用的字典
        getDicValue () {
            this.$store.dispatch('equip/setUnitMeasur')//更新计量单位
        },
        selectEquip () {
            this.selectEquipVisible = true
        },
        getInfo () {
            const params = {
                id: this.billid,
            }
            request.contractSettleBaseInfo(params).then(res=>{
                this.formData = res
                this.getPlanList()
            })
        },
        getPlanList () {
            const params = {
                id: this.billid,
            }
            //获取结算明细
            request.contractSettlePlanInfo(params).then(res=>{
                this.formData.transportContractSettleDtlList = res.transportContractSettleDtlList
                this.formData.isAttention = res.isAttention
            })
            //获取保证金
            request.settleBond(params).then(res=>{
                this.formData.facilityBondList = res.facilityBondList
                this.formData.facilityReturnBondList = res.facilityReturnBondList
            })
        },
        getNowDate () {
            this.$set(
                this.formData,
                'applyTime',
                new Date()
                    .toLocaleDateString()
                    .replace(new RegExp('/', 'g'), '-')
            )
        },
        handleFullScreen () {
            this.fullscreen = !this.fullscreen
        },
        cellClsNm ({ column }) {
            if (column.label === '') {
                return 'fixed-left'
            }
        },
        cellMouseEnter (row) {
            this.MouseEnterId = row.id
        },
        cellMouseLeave () {
            this.MouseEnterId = 0
        },
        // 获取最后一个内容区域的高度，计算底部空白
        getLastConHeight () {
            let si = setInterval(() => {
                // 因为dom异步加载，通过轮询找到渲染后的dom，获取高度
                if (document.getElementById('recodesCon')) {
                    const lastConHeight = document.getElementById('recodesCon').offsetHeight
                    console.log('lastConHeight: ', lastConHeight)
                    this.lastConHeight = lastConHeight
                    clearInterval(si)
                    si = null
                }
            }, 100)
        },
        onChangeTab (e) {
            console.log('clickTabFlag: ', this.clickTabFlag)
            $.scrollTo(`#${e.name}`, 500)
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            this.clickTabFlag = true
            // 动画结束后，恢复状态
            setTimeout(() => {
                this.clickTabFlag = false
            }, 600)
        },
        //选择设备确认
        selectConfirm (data) {
            if(!data) return false
            const arr = this.formData.summaryDtlList ? [...this.formData.summaryDtlList] : []
            data.forEach(x=>{
                if(!arr.find(item=>item.equipmentId === x.equipmentId)) {
                    let obj = {
                        'accumulate': 0,
                        'category': '',
                        'categoryId': '',
                        'equipId': '',
                        'equipmentName': '',
                        'equipmentNo': '',
                        'id': '',
                        'maintenanceApplicationSummaryDtlId': '',
                        'maintenanceApplicationSummaryId': '',
                        'maintenanceDetails': '',
                        'maintenanceFee': 0,
                        'manufacturer': '',
                        'specification': '',
                        ...x
                    }
                    arr.push(obj)
                    this.formData.summaryDtlList = arr
                    this.$set(this.formData, 'summaryDtlList',  arr)
                }
            })
            console.log('summaryDtlList', this.formData.summaryDtlList)
            this.selectEquipVisible = false
        },
        //保存
        preserve () {
            request.updateContractSettle(this.formData).then(()=>{
                showSuccessPop('保存成功')
            })
        },
        //提交
        submit () {
            request.contractSettleCommit(this.formData).then(()=>{
                request.leaseSettleCommit({ listid: this.billid }).then(()=>{
                    showSuccessPop('提交成功')
                    this.$router.push('/contractSettleList')
                })
            })

        },
        //删除
        deletePop () {
            showPromptPop('确定要删除吗？删除的数据可以在【回收站】还原或彻底删除。')
        },
        deleteBIll () {
            request.maintenanceSettleDelete({ listId: this.billid }).then(()=>{
                showSuccessPop('删除成功')
                this.$router.push('/contractSettleList')
            })
        },
        //删除结算明细列表
        deletePlanList () {
            this.planSelect.forEach(row=>{
                console.log('row', row.equipmentId)
                const index = this.formData.summaryDtlList.findIndex(item=>{
                    return item.equipmentId == row.equipmentId
                })
                this.formData.summaryDtlList.splice(index, 1)
            })

        },
        //获取结算明细表格的选择项
        planTableSelect (selection) {
            this.planSelect = selection
        },
        //取消
        handleClose () {
            this.$router.go(-1)
        },
    }
}
</script>

<style lang="scss" scoped>
.form {
    margin-top: 10px;
}

.e-table {
    background: #fff;

    /* .top {
    .left {
      padding: 20px;
      padding-top: 0px;
    }
  } */
}

.upload {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    text-align: center;
}

.upload-demo {
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>
